From e49bb1f8e9c755484314f6f662e4b03428baa9cc Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Tue, 31 May 2005 22:15:40 +0000 Subject: [PATCH] bitkeeper revision 1.1619.1.1 (429ce20czCzWvLkTZEZqyN2iK_13sw) sched.h, domain.c: Make {exec_,}domain_{un,}pause and ..._by_systemcontroller variants non-inline. Signed-off-by: Christian Limpach --- xen/common/domain.c | 62 ++++++++++++++++++++++++++++++++++++++ xen/include/xen/sched.h | 67 ++++------------------------------------- 2 files changed, 68 insertions(+), 61 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 06e748bd37..0cb93a8f36 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -223,6 +223,68 @@ void domain_destruct(struct domain *d) send_guest_virq(dom0->exec_domain[0], VIRQ_DOM_EXC); } +void exec_domain_pause(struct exec_domain *ed) +{ + ASSERT(ed != current); + atomic_inc(&ed->pausecnt); + domain_sleep(ed); + sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor)); +} + +void domain_pause(struct domain *d) +{ + struct exec_domain *ed; + + for_each_exec_domain( d, ed ) + { + ASSERT(ed != current); + atomic_inc(&ed->pausecnt); + domain_sleep(ed); + } + + sync_lazy_execstate_cpuset(d->cpuset); +} + +void exec_domain_unpause(struct exec_domain *ed) +{ + ASSERT(ed != current); + if ( atomic_dec_and_test(&ed->pausecnt) ) + domain_wake(ed); +} + +void domain_unpause(struct domain *d) +{ + struct exec_domain *ed; + + for_each_exec_domain( d, ed ) + exec_domain_unpause(ed); +} + +void domain_pause_by_systemcontroller(struct domain *d) +{ + struct exec_domain *ed; + + for_each_exec_domain ( d, ed ) + { + ASSERT(ed != current); + if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) ) + domain_sleep(ed); + } + + sync_lazy_execstate_cpuset(d->cpuset); +} + +void domain_unpause_by_systemcontroller(struct domain *d) +{ + struct exec_domain *ed; + + for_each_exec_domain ( d, ed ) + { + if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) ) + domain_wake(ed); + } +} + /* * set_info_guest is used for final setup, launching, and state modification diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 0bfc2345b4..3c073f7d63 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -389,42 +389,12 @@ static inline int domain_runnable(struct exec_domain *ed) !(ed->domain->domain_flags & (DOMF_shutdown|DOMF_crashed)) ); } -static inline void exec_domain_pause(struct exec_domain *ed) -{ - ASSERT(ed != current); - atomic_inc(&ed->pausecnt); - domain_sleep(ed); - sync_lazy_execstate_cpuset(ed->domain->cpuset & (1UL << ed->processor)); -} - -static inline void domain_pause(struct domain *d) -{ - struct exec_domain *ed; - - for_each_exec_domain( d, ed ) - { - ASSERT(ed != current); - atomic_inc(&ed->pausecnt); - domain_sleep(ed); - } - - sync_lazy_execstate_cpuset(d->cpuset); -} - -static inline void exec_domain_unpause(struct exec_domain *ed) -{ - ASSERT(ed != current); - if ( atomic_dec_and_test(&ed->pausecnt) ) - domain_wake(ed); -} - -static inline void domain_unpause(struct domain *d) -{ - struct exec_domain *ed; - - for_each_exec_domain( d, ed ) - exec_domain_unpause(ed); -} +void exec_domain_pause(struct exec_domain *ed); +void domain_pause(struct domain *d); +void exec_domain_unpause(struct exec_domain *ed); +void domain_unpause(struct domain *d); +void domain_pause_by_systemcontroller(struct domain *d); +void domain_unpause_by_systemcontroller(struct domain *d); static inline void exec_domain_unblock(struct exec_domain *ed) { @@ -432,31 +402,6 @@ static inline void exec_domain_unblock(struct exec_domain *ed) domain_wake(ed); } -static inline void domain_pause_by_systemcontroller(struct domain *d) -{ - struct exec_domain *ed; - - for_each_exec_domain ( d, ed ) - { - ASSERT(ed != current); - if ( !test_and_set_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) ) - domain_sleep(ed); - } - - sync_lazy_execstate_cpuset(d->cpuset); -} - -static inline void domain_unpause_by_systemcontroller(struct domain *d) -{ - struct exec_domain *ed; - - for_each_exec_domain ( d, ed ) - { - if ( test_and_clear_bit(_VCPUF_ctrl_pause, &ed->vcpu_flags) ) - domain_wake(ed); - } -} - #define IS_PRIV(_d) \ (test_bit(_DOMF_privileged, &(_d)->domain_flags)) #define IS_CAPABLE_PHYSDEV(_d) \ -- 2.30.2